<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <div id="app">Hello</div>
  <script>
    const data = {
      msg: 'Hello',
      number: 1
    }
    const vm = new Proxy(data, {
      get(target, key) {
        console.log('get:', key, target[key]);
        return target[key]
      },
      set(target, key, newValue) {
        console.log('set:', key, newValue);
        target[key] = newValue
      }
    })
    console.log(vm.number)

  </script>
</body>

</html>